package org.wx.herostory.services.util;

/**
 * @description:
 * @author: wangxun
 * @createDate: 2021/3/8
 * @version: 1.0
 */
public class Test {
    final String aa = null;
    String bb = null;
    public final static int f = 0x101;
    private int value = 100000000;

    public static void main(String[] args) {
        final String a = new String("abc")+new String("def");
        System.out.println(System.identityHashCode(a));
        //String b = new String("abcdef");

        System.out.println(System.identityHashCode(a.intern()));
        System.out.println(a.intern()==a);
        String c = "abcdef";
        System.out.println(System.identityHashCode(c));
        String d = new String("abcd") + "e" + "f";
        System.out.println(System.identityHashCode(d));
        System.out.println(System.identityHashCode(d.intern()));
        String e = new String("abcd") + "ef";
        System.out.println(System.identityHashCode(e));
    }
}
